<script>
    KindEditor.ready(function (K) {
        var editor1 = K.create('textarea[name="act_decribe"]', {
            cssPath: '/Public/Static/Admin/css/prettify.css',
            uploadJson: '/Upload/Uploads',
            afterCreate: function () {
                var self = this;
                K.ctrl(document, 13, function () {
                    self.sync();
                    K('form[name=example]')[0].submit();
                });
                K.ctrl(self.edit.doc, 13, function () {
                    self.sync();
                    K('form[name=example]')[0].submit();
                });
            }
        });
        prettyPrint();
    });
</script>

<div id="urHere">DouPHP 管理中心<b>></b><strong>添加文章</strong></div>
<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h3><a href="{:u('index')}" class="actionBtn">文章列表</a>添加文章</h3>
    <form action="{:u('addArt')}" method="post" enctype="multipart/form-data">
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
                <td width="90" align="right">活动名称</td>
                <td>
                    <input type="text" name="act_tittle" value="" size="80" class="inpMain"/>
                    <span class="error">{$errData['act_tittle']}</span>
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">活动描述</td>
                <td>
                    <textarea id="editor_id" name="act_decribe" style="width:700px;height:300px;">

                    </textarea>
                    <!--<textarea id="content" name="act_decribe" style="width:780px;height:400px;" class="textArea"></textarea>-->
                    <span class="error">{$errData['act_decribe']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">活动照片</td>
                <td>
                    <!--<div id="demo" class="demo"></div>-->
                    <!--<input type="file" name="act_img" size="38" class="inpFlie" />-->
                    <!--<img src="__STATIC__/Admin/images/icon_no.png">-->
                </td>
                <span class="error">{$errData['act_img']}</span>
                <!--<div id="demo" class="demo"></div>-->
            </tr>
            <tr>
                <td align="right">活动费用</td>
                <td>
                    <input type="text" name="act_price" value="" size="50" class="inpMain"/> 元
                    <span class="error">{$errData['act_price']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">活动开始时间</td>
                <td>
                    <input type="text" class="inpMain" name="act_start_time" size="50" data-c="pickdate" id="pickdate"/>
                    <span class="error">{$errData['act_start_time']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">活动结束时间</td>
                <td>
                    <input type="text" name="act_stop_time" value="" size="50" data-c="pickdate" class="inpMain"/>
                    <span class="error">{$errData['act_stop_time']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">报名开始时间</td>
                <td>
                    <input type="text" name="start_time" value="" size="50" data-c="pickdate" class="inpMain"/>
                    <span class="error">{$errData['start_time']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">截止报名时间</td>
                <td>
                    <input type="text" name="end_time" value="" size="50" data-c="pickdate" class="inpMain"/>
                    <span class="error">{$errData['end_time']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">活动类别</td>
                <td>
                    <select name="act_type_code">
                        <option value="">--活动类别--</option>
                        <option value="1">收费</option>
                        <option value="0">免费</option>
                    </select>
                    <span class="error">{$errData['act_type_code']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">主办方</td>
                <td>
                    <input type="text" name="act_organizer" value="" size="50" class="inpMain"/>
                    <span class="error">{$errData['act_organizer']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">参加人数限制</td>
                <td>
                    <input type="text" name="act_joiner_num" value="" size="50" class="inpMain"/>
                    <span class="error">{$errData['act_joiner_num']}</span>
                </td>
            </tr>
            <tr>
                <td align="right">活动地址</td>
                <td>
                    <input type="text" name="act_address" value="" size="50" class="inpMain"/>
                    <span class="error">{$errData['act_address']}</span>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="hidden" name="token" value="7e4a88fb"/>
                    <input type="hidden" name="image" value="">
                    <input type="hidden" name="id" value="">
                    <button type="button" name="button" class="btn">提 交</button>
                </td>
            </tr>
        </table>
    </form>
</div>

<script type="text/javascript">

    function douAction() {
        var frm = document.forms['action'];

        frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
    }

</script>


<script type="text/javascript">
    $("input[data-c='pickdate']").dateDropper({
        animate: false,
        format: 'Y-m-d',
        maxYear: '2020'
    });
    //    $("#picktime").timeDropper({
    //        meridians: false,
    //        format: 'HH:mm',
    //    });
</script>
<script type="text/javascript">
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?cc58f09bfb6ccacac51c4e5d7787d7d0";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
